Skip to content

Comments

Feat/#6 drop down#7

Merged
eunhyekimyeah merged 3 commits intodevelopfrom
feat/#6-drop-down
Feb 20, 2026
Merged

Feat/#6 drop down#7
eunhyekimyeah merged 3 commits intodevelopfrom
feat/#6-drop-down

Conversation

@chunjaemin
Copy link
Contributor

@chunjaemin chunjaemin commented Feb 15, 2026

📝 요약

  • 공용 드롭다운 컴포넌트 개발

⚙️ 작업 내용

  • shared/ui/select에 공용 드롭다운 컴포넌트 개발
  • styleSheet용 디자인 토큰 파일 추가 (tokens.tsx)
    | 외부 라이브러리는 nativeWind 연동이 안되서 tokens파일을 따로 만들었습니다.

완료된 컴포넌트 사진

아래 사진은 공용 드롭다운 컴포넌트로 로그인 과정에 쓰이는 드롭다운을 만들어본 예시 사진입니다.
image

image

🔗 관련 이슈

💬 리뷰어에게

  • 드롭다운 컴포넌트 사용법은 WIKI에 상세하게 적어두었으니 참고부탁드립니다!

@github-actions
Copy link

Thanks for the contribution!
I have applied any labels matching special text in your title and description.

Please review the labels and make any necessary changes.

@github-actions github-actions bot added the feature 새로운 기능 구현 label Feb 15, 2026
@gemini-code-assist
Copy link

Summary of Changes

Hello @chunjaemin, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 애플리케이션 전반에 걸쳐 일관된 사용자 경험을 제공하기 위한 공용 드롭다운 컴포넌트를 도입합니다. 이를 통해 UI 개발의 효율성을 높이고, 디자인 시스템의 통일성을 강화하며, 향후 유사한 컴포넌트 개발 시 재사용성을 확보할 수 있습니다.

Highlights

  • 공용 드롭다운 컴포넌트 개발: 애플리케이션 전반에 걸쳐 재사용 가능한 드롭다운 컴포넌트가 shared/ui/select 경로에 개발되었습니다.
  • 디자인 토큰 파일 추가: React Native 스타일 객체에서 사용할 색상 토큰을 정의하는 tokens.ts 파일이 새로 추가되었습니다.
  • 외부 라이브러리 통합: 드롭다운 기능 구현을 위해 react-native-element-dropdown 라이브러리가 프로젝트에 추가되었습니다.
Changelog
  • package.json
    • react-native-element-dropdown 의존성이 추가되었습니다.
  • src/shared/styles/tokens.ts
    • React Native 스타일에서 사용할 색상 토큰을 정의한 파일이 새로 추가되었습니다.
  • src/shared/ui/index.ts
    • 새로 생성된 select 모듈을 내보내도록 업데이트되었습니다.
  • src/shared/ui/select/Select.tsx
    • react-native-element-dropdown 라이브러리를 활용하여 공용 Select 컴포넌트가 구현되었습니다.
  • src/shared/ui/select/index.ts
    • Select 컴포넌트와 관련 타입들을 내보내도록 정의되었습니다.
  • src/shared/ui/select/types.ts
    • Select 컴포넌트의 SelectItem, SelectProps, SelectSize 타입 정의가 추가되었습니다.
  • yarn.lock
    • 새로운 의존성 추가에 따라 잠금 파일이 업데이트되었습니다.
Activity
  • chunjaemin님이 공용 드롭다운 컴포넌트 개발을 위해 이 PR을 생성했습니다.
  • PR 설명에 컴포넌트 사용법은 WIKI를 참고해달라는 요청이 포함되어 있습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이 PR은 공용 드롭다운 컴포넌트를 추가하고 관련 스타일 토큰을 정의합니다. 전반적으로 컴포넌트 구현이 잘 되어 있으며, 외부 라이브러리를 래핑하여 공통 인터페이스를 제공하는 좋은 접근 방식입니다. 몇 가지 유지보수성 및 일관성 개선을 위한 제안 사항이 있습니다. tokens.ts 파일의 색상 값들이 global.styles.css와 수동으로 동기화되어야 하는 점은 장기적으로 불일치를 유발할 수 있습니다. 또한 Select.tsx 컴포넌트 내에서 불필요한 useMemo 사용과 스타일링 방식의 불일치가 발견되었습니다. 자세한 내용은 각 파일에 대한 리뷰 코멘트를 참고해주세요.

Comment on lines +1 to +33
/**
* RN style 객체에서 사용하기 위한 토큰 상수.
*
* NOTE:
* - React Native style은 `var(--token)`을 직접 해석하지 못하므로,
* `global.styles.css`의 토큰 값을 여기에도 "동일한 값"으로 유지합니다.
* - 값 변경 시 `global.styles.css`와 함께 수정하세요.
*/

export const colorTokens = {
/** global.styles.css: --color-primary (blue-500) */
primary: "#0068FE",
/** global.styles.css: --color-primary-tint (blue-100) */
primaryTint: "#E5F6FE",

/** global.styles.css: --color-neutral (gray-100) */
neutral: "#F4F4F5",
/** global.styles.css: --color-neutral-variant (gray-300) */
neutralVariant: "#DBDDE1",

/** global.styles.css: --color-canvas (white) */
canvas: "#FEFFFE",

/** global.styles.css: --color-danger (red-500) */
danger: "#FF6562",

/** global.styles.css: --color-content-primary (black) */
contentPrimary: "#040404",
/** global.styles.css: --color-content-secondary (gray-500) */
contentSecondary: "#8E9398",
/** global.styles.css: --color-content-inverse (blue-50) */
contentInverse: "#F4F6FE",
} as const;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

tokens.tsglobal.styles.css에 색상 토큰이 분리되어 있어 두 파일 간의 값이 달라질 위험이 있습니다. 이는 장기적인 유지보수성을 저해할 수 있습니다. 예를 들어, 한쪽 파일의 값만 수정하면 UI 불일치가 발생할 수 있습니다.
이 문제를 해결하기 위해, 디자인 토큰을 JSON이나 YAML 같은 단일 소스 파일에서 관리하고, 빌드 스크립트를 통해 tokens.ts와 CSS 변수를 모두 생성하는 방식을 고려해보시는 것을 추천합니다. 이렇게 하면 토큰 값의 일관성을 보장할 수 있습니다.

Comment on lines +38 to +42
const dropdownData = useMemo(() => {
// react-native-element-dropdown은 disabled key가 없어서
// item 렌더링/선택 로직에서 직접 처리한다.
return items;
}, [items]);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

useMemo 훅이 여기서는 단순히 items prop을 반환하고 있어 메모이제이션의 이점이 없습니다. 코드를 단순화하기 위해 useMemo를 제거하고 Dropdown 컴포넌트의 data prop에 items를 직접 전달하는 것이 좋습니다. useMemo 내의 주석은 유용하지만, disabled 로직이 실제로 처리되는 onChange 핸들러 근처로 옮기는 것이 더 적절해 보입니다.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 items가 대부분 고정 데이터일 거 같아서 useMemo 리뷰는 수용해도 될 거 같네요! 😁

Comment on lines +124 to +134
<Text
style={{
fontFamily: "Pretendard-Regular",
fontSize: sizeToken.fontSize,
color: isSelected
? colorTokens.primary
: colorTokens.contentPrimary,
}}
>
{item.label}
</Text>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

컴포넌트 내 다른 부분에서는 className을 사용하여 스타일을 적용하고 있지만, renderItemText 컴포넌트에서는 인라인 style 객체와 하드코딩된 fontFamily를 사용하여 스타일링 방식에 일관성이 부족합니다. placeholderStyleselectedTextStyle에도 동일한 문제가 있습니다.

유지보수성과 일관성을 높이기 위해 className을 사용하고, 폰트 이름 하드코딩을 피하는 것을 권장합니다. size prop에 따라 동적으로 클래스를 적용할 수 있습니다.

Suggested change
<Text
style={{
fontFamily: "Pretendard-Regular",
fontSize: sizeToken.fontSize,
color: isSelected
? colorTokens.primary
: colorTokens.contentPrimary,
}}
>
{item.label}
</Text>
<Text
className={`font-regular ${
size === "sm" ? "text-sm" : "text-base"
} ${
isSelected
? "text-primary"
: "text-content-primary"
}`}
>
{item.label}
</Text>

Copy link
Contributor

@ahcgnoej ahcgnoej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

고생하셨습니당 토큰파일 만들어주신 거 잘 썼습니다👍👍

Comment on lines +38 to +42
const dropdownData = useMemo(() => {
// react-native-element-dropdown은 disabled key가 없어서
// item 렌더링/선택 로직에서 직접 처리한다.
return items;
}, [items]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

저희 items가 대부분 고정 데이터일 거 같아서 useMemo 리뷰는 수용해도 될 거 같네요! 😁

@eunhyekimyeah eunhyekimyeah merged commit b6be9cc into develop Feb 20, 2026
6 checks passed
@chunjaemin chunjaemin deleted the feat/#6-drop-down branch February 23, 2026 04:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature 새로운 기능 구현

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT/#6] 드롭다운 공용 컴포넌트 개발

3 participants